<?php
$url = '/epay/submit';
$method = $_SERVER['REQUEST_METHOD'];
$forms = '';
foreach ($_REQUEST as $k => $v) {
    if (substr($k, 0, 1) === '_') {
        continue;
    }
    $forms .= "<input name='{$k}' value='{$v}' type='hidden'>";
}
echo <<<HTML
<form id="form" action="{$url}" method="{$method}">
{$forms}
</form>
<script >
document.getElementById('form').submit();
</script>
HTML;

